package com.hua.nailcampus.acl.model.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.hua.nailcampus.acl.model.Dynamic;
import com.hua.nailcampus.acl.model.DynamicReply;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * @Author:chenjianhua
 * @Date:2023/12/21 20:32
 * @Version 1.8
 */
@Data
public class DynamicVo implements Serializable {
    private static final long serialVersionUID = 1L;
    private Integer id;
    private Integer userId;
    private String userName;
    private String userAvatar;
    private String content;
    private String fileList;
    private List<String> resourceList;
    private List<DynamicLikesVo> likesList;
    private List<DynamicReplyVo> replyList;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;
    public DynamicVo(){}
    public DynamicVo(Dynamic dynamic){
        this.id = dynamic.getId();
        this.userId = dynamic.getUserId();
        this.content = dynamic.getContent();
        this.createTime = dynamic.getCreateTime();
    }

}
